#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:6031)
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<math.h>



#define HEIGHT 24
#define WIDTH 80

char screen[HEIGHT][WIDTH];

void drawfirework(int x, int y, char c, int size)
{
    for (int i = -size; i <= size; i++)
    {
        for (int j = -size; j <= size; j++)
        {
            double d = sqrt(i * i + j * j);
            if (d <= size)
            {
                int xx = x + i;
                int yy = y + i;
                if (xx >= 0 &amp; &amp; xx < WIDITH & amp; &amp; yy >= 0 & amp; &amp; yy < HEIGHT)
                {                 
                            screen[yy][xx] = c;                       
                }
                    
                    
            }
        }
    }
}



int main(int argc, char** argv)
{
    srand(time(0));
    for (int i = 0; i< HEIGHT; i++)
    {
        for (int j = 0; j < WIDTH; j++)
        {
            screen[i][j] = ' ';
        }
    }
    for (int i = 0; i < 100; i++)
    {
        int x = rand() % WIDTH;
        int y = rand() % HEIGHT;
        char c = rand() % ('Z' - 'A' + 1) + 'A';
        int size = rand() % 5 + 2;
        drawfirework(x, y, c, size);
    }
    for (int i = 0; i < HEIGHT; i++) {
        for (int j = 0; j < WIDTH; j++) {
            putchar(screen[i][j]);
        }
        putchar('\n');
    }

	return 0;
}

